package edu.iu.criminfo.voronoi.cases;

import java.util.List;

import edu.iu.criminfo.voronoi.kmeans.Cluster;
import edu.iu.criminfo.voronoi.object.Point;

public class Case {
	private Point location;
	private double responseTime;
	private String crimeType;
	
	public Case(Point location) {
		this.location = location;
	}
	
	public Case(Point location, double responseTime) {
		this(location);
		this.responseTime = responseTime;
	}
	
	public Case(Point location, double responseTime, String crimeType) {
		this(location, responseTime);
		this.crimeType = crimeType;
	}
	
	public boolean inBound(Point lower, Point upper) {
		if ((location.coordinateX > lower.coordinateX) && (location.coordinateX < upper.coordinateX)) {
			if ((location.coordinateY > lower.coordinateY) && (location.coordinateY < upper.coordinateY)) {
				return true;
			}
		}
		return false;
	}
	
	public int inWhichCluster(List<Cluster> clusterList) {
		return location.inWhichCluster(clusterList);
	}
	
	public int inWitchCluster(List<Cluster> clusterList, double alpha, double capacity) {
		return location.inWitchCluster(clusterList, alpha, capacity);
	}
	
	public Point getLocation() {
		return location;
	}

	public void setLocation(Point location) {
		this.location = location;
	}

	public double getResponseTime() {
		return responseTime;
	}

	public void setResponseTime(double responseTime) {
		this.responseTime = responseTime;
	}

	public String getCrimeType() {
		return crimeType;
	}

	public void setCrimeType(String crimeType) {
		this.crimeType = crimeType;
	}

}
